<?php

namespace App\Http\Controllers\Purchase;

use App\Http\Controllers\BaseController;
use App\Models\Purchase\PurchaseOrder;
use App\Models\Purchase\PurchaseSettleOrder;
use App\Services\Common\TableExtFeild;
use Illuminate\Http\Request;


/**
 * 结算单
 */
class PurchaseSettleOrderController extends BaseController
{
    /**
     * 结算单列表--取T+
     */
    public function getlist(Request $request)
    {

        $cpid = $this->mangerinfo['cpid'];
        $manger_id = $this->mangerinfo['id'];
        if ($this->mangerinfo['utype'] == 4) {
            $manger_id = 0; //查询所有订单
        }
        $list = PurchaseSettleOrder::getList($request, $cpid, $manger_id);
        return response()->json(['code' => '000', 'msg' => '操作成功', 'data' => $list]);
    }

    /**
     * 完结--废弃
     */
    public function dofinish(Request $request) {}

    /**
     * 一键完结--废弃
     */
    public function dofinishall(Request $request) {}
}
